package com.github.maojian;

import org.junit.Test;

public class IntegerTest {

    /*
     * 包装类对象的缓存问题
     */
    @Test
    public void test() {
        Integer i1 = 10;
        Integer i2 = 10;
        System.out.println(i1 == i2);//true

        Integer i3 = 128;
        Integer i4 = 128;
        System.out.println(i3 == i4);//false
    }

    @Test
    public void test01() {
        int k = 1;
        k = k++;
        System.out.println(k);
    }
}
